//
//  LHRecommendHotelModel.m
//  Knight_Tour
//
//  Created by Bruce_Lin on 15/5/13.
//  Copyright (c) 2015年 TouchOne. All rights reserved.
//

#import "LHRecommendHotelModel.h"

@implementation LHRecommendHotelModel



- (void)dealloc
{
    [_website release];
    [_hotelDescription release];
    [_recommended_reason release];
    [_address release];
    [_name release];
    [_cover_s release];
    [_cover release];
    
    [super dealloc];
}


// 属性与系统重名调用此方法
- (instancetype)initWithDic:(NSDictionary *)dic
{
    self = [super init];
    if (self) {
        
        [self setValuesForKeysWithDictionary:dic];
        
        self.hotelDescription = [dic objectForKey:@"description"];
    }
    
    return self;
}

- (void)encodeWithCoder:(NSCoder *)aCoder
{
    [aCoder encodeObject:self.website forKey:@"website"];
    [aCoder encodeObject:self.hotelDescription forKey:@"hotelDescription"];
    [aCoder encodeObject:self.recommended_reason forKey:@"recommended_reason"];
    [aCoder encodeObject:self.address forKey:@"address"];
    [aCoder encodeObject:self.name forKey:@"name"];
    [aCoder encodeObject:self.cover_s forKey:@"cover_s"];
    [aCoder encodeObject:self.cover forKey:@"cover"];
}

- (id)initWithCoder:(NSCoder *)aDecoder
{
    if (self = [super init]) {
        self.website = [aDecoder decodeObjectForKey:@"website"];
        self.hotelDescription = [aDecoder decodeObjectForKey:@"hotelDescription"];
        self.recommended_reason = [aDecoder decodeObjectForKey:@"recommended_reason"];
        self.address = [aDecoder decodeObjectForKey:@"address"];
        self.name = [aDecoder decodeObjectForKey:@"name"];
        self.cover_s = [aDecoder decodeObjectForKey:@"cover_s"];
        self.cover = [aDecoder decodeObjectForKey:@"cover"];
    }
    return self;
}

@end
